Optimal. Leaf size=255 \[ \frac {\cot (e+f x) E\left (\text {ArcSin}\left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (1+\sec (e+f x))}{a-b}}}{\sqrt {a+b} f}-\frac {\cot (e+f x) F\left (\text {ArcSin}\left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (1+\sec (e+f x))}{a-b}}}{\sqrt {a+b} f}-\frac {\cot (e+f x)}{f \sqrt {a+b \sec (e+f x)}}+\frac {b^2 \tan (e+f x)}{\left (a^2-b^2\right ) f \sqrt {a+b \sec (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.23, antiderivative size = 255, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3960, 3918, 21,
3914, 3917, 4089} \begin {gather*} \frac {b^2 \tan (e+f x)}{f \left (a^2-b^2\right ) \sqrt {a+b \sec (e+f x)}}-\frac {\cot (e+f x) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (\sec (e+f x)+1)}{a-b}} F\left (\text {ArcSin}\left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{f \sqrt {a+b}}+\frac {\cot (e+f x) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (\sec (e+f x)+1)}{a-b}} E\left (\text {ArcSin}\left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{f \sqrt {a+b}}-\frac {\cot (e+f x)}{f \sqrt {a+b \sec (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 21
Rule 3914
Rule 3917
Rule 3918
Rule 3960
Rule 4089
Rubi steps
\begin {align*} \int \frac {\csc ^2(e+f x)}{\sqrt {a+b \sec (e+f x)}} \, dx &=-\frac {\cot (e+f x)}{f \sqrt {a+b \sec (e+f x)}}-\frac {1}{2} b \int \frac {\sec (e+f x)}{(a+b \sec (e+f x))^{3/2}} \, dx\\ &=-\frac {\cot (e+f x)}{f \sqrt {a+b \sec (e+f x)}}+\frac {b^2 \tan (e+f x)}{\left (a^2-b^2\right ) f \sqrt {a+b \sec (e+f x)}}+\frac {b \int \frac {\sec (e+f x) \left (-\frac {a}{2}-\frac {1}{2} b \sec (e+f x)\right )}{\sqrt {a+b \sec (e+f x)}} \, dx}{a^2-b^2}\\ &=-\frac {\cot (e+f x)}{f \sqrt {a+b \sec (e+f x)}}+\frac {b^2 \tan (e+f x)}{\left (a^2-b^2\right ) f \sqrt {a+b \sec (e+f x)}}-\frac {b \int \sec (e+f x) \sqrt {a+b \sec (e+f x)} \, dx}{2 \left (a^2-b^2\right )}\\ &=-\frac {\cot (e+f x)}{f \sqrt {a+b \sec (e+f x)}}+\frac {b^2 \tan (e+f x)}{\left (a^2-b^2\right ) f \sqrt {a+b \sec (e+f x)}}-\frac {b \int \frac {\sec (e+f x)}{\sqrt {a+b \sec (e+f x)}} \, dx}{2 (a+b)}-\frac {b^2 \int \frac {\sec (e+f x) (1+\sec (e+f x))}{\sqrt {a+b \sec (e+f x)}} \, dx}{2 \left (a^2-b^2\right )}\\ &=\frac {\cot (e+f x) E\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (1+\sec (e+f x))}{a-b}}}{\sqrt {a+b} f}-\frac {\cot (e+f x) F\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (1+\sec (e+f x))}{a-b}}}{\sqrt {a+b} f}-\frac {\cot (e+f x)}{f \sqrt {a+b \sec (e+f x)}}+\frac {b^2 \tan (e+f x)}{\left (a^2-b^2\right ) f \sqrt {a+b \sec (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 4.56, size = 259, normalized size = 1.02 \begin {gather*} \frac {\sqrt {\sec (e+f x)} \left (\frac {(b+a \cos (e+f x)) (-a+b \cos (e+f x)) \csc (e+f x)}{\left (a^2-b^2\right ) \sqrt {\sec (e+f x)}}+\frac {b \left (-\frac {(a+b) \sqrt {\frac {b+a \cos (e+f x)}{(a+b) (1+\cos (e+f x))}} \left (E\left (\text {ArcSin}\left (\tan \left (\frac {1}{2} (e+f x)\right )\right )|\frac {a-b}{a+b}\right )-F\left (\text {ArcSin}\left (\tan \left (\frac {1}{2} (e+f x)\right )\right )|\frac {a-b}{a+b}\right )\right )}{\sqrt {\frac {\cos (e+f x)}{1+\cos (e+f x)}}}-(b+a \cos (e+f x)) \tan \left (\frac {1}{2} (e+f x)\right )\right )}{\left (-a^2+b^2\right ) \sqrt {\sec ^2\left (\frac {1}{2} (e+f x)\right )} \sqrt {\cos ^2\left (\frac {1}{2} (e+f x)\right ) \sec (e+f x)}}\right )}{f \sqrt {a+b \sec (e+f x)}} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(851\) vs.
\(2(233)=466\).
time = 0.24, size = 852, normalized size = 3.34
method | result | size |
default | \(-\frac {\left (-1+\cos \left (f x +e \right )\right )^{2} \left (-\EllipticF \left (\frac {-1+\cos \left (f x +e \right )}{\sin \left (f x +e \right )}, \sqrt {\frac {a -b}{a +b}}\right ) \cos \left (f x +e \right ) \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sqrt {\frac {a \cos \left (f x +e \right )+b}{\left (\cos \left (f x +e \right )+1\right ) \left (a +b \right )}}\, \sin \left (f x +e \right ) a b -\EllipticF \left (\frac {-1+\cos \left (f x +e \right )}{\sin \left (f x +e \right )}, \sqrt {\frac {a -b}{a +b}}\right ) \cos \left (f x +e \right ) b^{2} \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sqrt {\frac {a \cos \left (f x +e \right )+b}{\left (\cos \left (f x +e \right )+1\right ) \left (a +b \right )}}\, \sin \left (f x +e \right )+\EllipticE \left (\frac {-1+\cos \left (f x +e \right )}{\sin \left (f x +e \right )}, \sqrt {\frac {a -b}{a +b}}\right ) \cos \left (f x +e \right ) \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sqrt {\frac {a \cos \left (f x +e \right )+b}{\left (\cos \left (f x +e \right )+1\right ) \left (a +b \right )}}\, \sin \left (f x +e \right ) a b +\EllipticE \left (\frac {-1+\cos \left (f x +e \right )}{\sin \left (f x +e \right )}, \sqrt {\frac {a -b}{a +b}}\right ) \cos \left (f x +e \right ) b^{2} \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sqrt {\frac {a \cos \left (f x +e \right )+b}{\left (\cos \left (f x +e \right )+1\right ) \left (a +b \right )}}\, \sin \left (f x +e \right )-\sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sqrt {\frac {a \cos \left (f x +e \right )+b}{\left (\cos \left (f x +e \right )+1\right ) \left (a +b \right )}}\, \EllipticF \left (\frac {-1+\cos \left (f x +e \right )}{\sin \left (f x +e \right )}, \sqrt {\frac {a -b}{a +b}}\right ) a b \sin \left (f x +e \right )-\sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sqrt {\frac {a \cos \left (f x +e \right )+b}{\left (\cos \left (f x +e \right )+1\right ) \left (a +b \right )}}\, \EllipticF \left (\frac {-1+\cos \left (f x +e \right )}{\sin \left (f x +e \right )}, \sqrt {\frac {a -b}{a +b}}\right ) b^{2} \sin \left (f x +e \right )+\EllipticE \left (\frac {-1+\cos \left (f x +e \right )}{\sin \left (f x +e \right )}, \sqrt {\frac {a -b}{a +b}}\right ) \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sqrt {\frac {a \cos \left (f x +e \right )+b}{\left (\cos \left (f x +e \right )+1\right ) \left (a +b \right )}}\, \sin \left (f x +e \right ) a b +\EllipticE \left (\frac {-1+\cos \left (f x +e \right )}{\sin \left (f x +e \right )}, \sqrt {\frac {a -b}{a +b}}\right ) b^{2} \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sqrt {\frac {a \cos \left (f x +e \right )+b}{\left (\cos \left (f x +e \right )+1\right ) \left (a +b \right )}}\, \sin \left (f x +e \right )+\left (\cos ^{2}\left (f x +e \right )\right ) a^{2}-\left (\cos ^{2}\left (f x +e \right )\right ) a b +\cos \left (f x +e \right ) a b -\cos \left (f x +e \right ) b^{2}\right ) \left (\cos \left (f x +e \right )+1\right )^{2} \sqrt {\frac {a \cos \left (f x +e \right )+b}{\cos \left (f x +e \right )}}}{f \left (a \cos \left (f x +e \right )+b \right ) \sin \left (f x +e \right )^{5} \left (a -b \right ) \left (a +b \right )}\) | \(852\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\csc ^{2}{\left (e + f x \right )}}{\sqrt {a + b \sec {\left (e + f x \right )}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {1}{{\sin \left (e+f\,x\right )}^2\,\sqrt {a+\frac {b}{\cos \left (e+f\,x\right )}}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________